
Use Tunga

GO
--Insert
CREATE PROC insertTable
	@[restaurantid] int,
	@[tabletypeid] int
AS
INSERT INTO  [Table]([restaurantid],[tabletypeid])
 VALUES(@[restaurantid],@[restaurantid])

GO
--Update
CREATE PROC updateTable
	@[id] int,
	@[restaurantid] int,
	@[tabletypeid] int
AS
UPDATE [Table] SET	
	[restaurantid] =@[restaurantid],
	[tabletypeid] =@[tabletypeid]
WHERE 	[id] =@[id]
GO
--Delete
CREATE PROC deleteTable
	@[id] int
AS
	DELETE FROM [Table] WHERE [id]=@[id]
GO
--Get All Table
CREATE PROC getAllTable
AS
SELECT * from [Table]
GO
--Get Table By ID
CREATE PROC getTableByID
	@[id] int
AS
SELECT * from [Table] WHERE [id]=@[id]
GO


